<template>
	<view>
		<view class="h100"></view>
		<u--textarea height="100" maxlength="300" style="background-color:#e7e7e7 ;" v-model="value1" placeholder="请输入内容" border="bottom" count></u--textarea>
		<view class="h20"></view>
		<button type="default" @click="putFeedBack">提交</button>
	</view>
</template>

<script>
export default {
	data() {
		return {
			value1: ''
		};
	},
	onShow() {
		this.value1 = '';
	},
	methods: {
		async putFeedBack() {
			let userInfo = uni.getStorageInfoSync('userInfo');
			let data = {
				ucontent: this.value1,
				userFeedbackTypeId: userInfo.userId
			};
			await this.$API.userApi.putFeedBack(data);
			uni.showToast({
				title: '成功'
			});
			this.value1 = '';
		}
	}
};
</script>

<style lang="scss">
page {
	background-color: #fafafa;
}
</style>
